from django.contrib import admin
from .models import Type, Product, PersonInfo, Vocation


# Register your models here.
@admin.register(Type)
class TypeAdmin(admin.ModelAdmin):
    list_display = ("id", "type_name")
    list_filter = ("type_name",)
    search_fields = ("type_name",)


@admin.register(Product)
class ProductAdmin(admin.ModelAdmin):
    list_display = ("id", "name", "weight", "size", "type")


@admin.register(PersonInfo)
class PersonInfoAdmin(admin.ModelAdmin):
    list_display = ("id", "name", "age", "hireDate", "created_at", "updated_at")
    list_filter = ("name", "age")
    search_fields = ("name",)
    ordering = ("hireDate", "created_at",)


@admin.register(Vocation)
class VocationAdmin(admin.ModelAdmin):
    list_display = ("id", "job", "title", "payment", "name")
    list_filter = ("job", "payment", "name")
    search_fields = ("name",)
